<!DOCTYPE html>
<html lang="cn" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>互联网村镇管理平台</title>
    <link rel="stylesheet" type="text/css" th:href="@{/css/common.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/css/main.css}" />
</head>
<body>
    <div class="container clearfix">
        <!--/sidebar-->
        <div class="main-wrap">
            <div class="crumb-wrap">
                <div class="crumb-list">
                    <i class="icon-font">&#xe973;</i>
                    <a href="javascript:void(0);">角色管理</a>
                    <span class="crumb-step">&gt;</span>
                    <span class="crumb-name">角色列表</span>
                </div>
            </div>
            <div class="search-wrap">
                <div class="search-content">
                    <form action="list" method="post" id="queryForm">
                        <table class="search-tab" style="margin-left: 10px;">
                            <tr>
                                <th width="70">角色名称:</th>
                                <td>
                                    <input class="common-text" placeholder="角色名称" name="roleName" th:value="${roleName}" type="text" />
                                </td>
                                <td>
                                    <input class="btn btn-primary btn2" name="sub" value="查询" type="submit">
                                </td>
                            </tr>
                        </table>
                    </form>
                </div>
            </div>
            <div class="result-wrap">
                <div class="result-title">
                    <div class="result-list">
                        <a th:href="@{/role/addRole}"><i class="icon-font">&#xea0a;</i>新增角色</a>
                        <a id="batchDel" href="javascript:batchDeleteRoles();"><i class="icon-font">&#xe9ac;</i>批量删除</a>
                    </div>
                </div>
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr>
                            <th class="tc" width="5%"><input class="allChoose" onclick="javascript:shiro.form.setCheckBoxSelectToggle('userIdCheckBox');" type="checkbox" /></th>
                            <th width="20%">角色名称</th>
                            <th width="20%">角色描述</th>
                            <th width="20%">注册时间</th>
                            <th width="20%">更新时间</th>
                            <th class="tc" width="15%">操作</th>
                        </tr>

                        <tr th:each="role:${roleList}">
                            <td class="tc">
                                <input name="roleIdCheckBox" th:value="${role.roleId}" type="checkbox" />
                            </td>
                            <td th:text="${role?.roleName}"></td>
                            <td th:text="${role?.roleDesc}"></td>
                            <td th:text="${#dates.format(role?.createTime,'yyyy-MM-dd HH:mm:ss')}"></td>
                            <td th:text="${#dates.format(role?.updateTime,'yyyy-MM-dd HH:mm:ss')}"></td>
                            <td class="tc">
                                <a class="link-update" th:href="@{'/role/editRole/' + ${role?.roleId}}">修改</a>
                                <a class="link-del" th:href="'javascript:deletetRole(\'' + ${role?.roleId } + '\');'">删除</a>
                            </td>
                        </tr>
                    </table>

                </div>
                <div class="list-page" th:utext="${pageHtml}">
                </div>
            </div>
        </div>


    </div>
    <div th:include="admin/common/common"></div>
    <script type="text/javascript" th:src="@{/js/web/role/role.js?v=1.0}"></script>
</body>
</html>